<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<title>GetMinFarVersion</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>GetMinFarVersion</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">exported functions</a>
</div>

<div class=shortdescr>
The <dfn>GetMinFarVersion</dfn> is called to get the minimum FAR version
required for the plugin to work correctly.
</div>

<pre class=syntax>
int WINAPI GetMinFarVersion(void);
</pre>

<h3>Parameters</h3>
<div class=descr>
None.
</div>

<h3>Return value</h3>
<div class=descr>
This function must return an integer in the form <code>0xZZZZXXYY</code>:
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Component</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%">ZZZZ</td>
<td class="cont" width="60%">build number (FAR 1.70.387 = 0x0183)</td></tr>
<tr class="cont"><td class="cont" width="40%">XX</td>
<td class="cont" width="60%">major version (FAR 1.70 = 0x01)</td></tr>
<tr class="cont"><td class="cont" width="40%">YY</td>
<td class="cont" width="60%">minor version (FAR 1.70 = 0x46)</td></tr>
</table>

<p>It is <b>recomended</b> to use the macro
<a href="../defs/makefarversion.html">MAKEFARVERSION</a>.
</div>

<h3>Remarks</h3>
<div class=descr>
If the required version is greater than the current FAR version,
an error message is displayed and the plugin is then unloaded.
</div>


<h3>Example</h3>
<div class=descr>
<pre class=code>
// For a plugin that requires FAR Manager 1.70 build 591 or later
int WINAPI _export GetMinFarVersion(void)
{
  return MAKEFARVERSION(1,70,591);
}

// And this plugin will work in FAR Manager version 1.70 and later
int WINAPI _export GetMinFarVersion(void)
{
  return MAKEFARVERSION(1,70,0);
}
</pre>
</div>

<div class=see>See also:</div><div class=seecont>
<a href="../defs/makefarversion.html">MAKEFARVERSION</a>,
<a href="../defs/farmanagerversion.html">FARMANAGERVERSION</a><!--,
<a href="../articles/good_version.html">"Plugin for different FAR Manager versions"</a>-->
</div>

</body>
</html>
